package  com.bawei.base.userrole.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import  com.bawei.base.userrole.mapper.ReUserRoleMapper;
import  com.bawei.base.userrole.model.ReUserRole;
import  com.bawei.base.userrole.model.ReUserRoleExample;
import  com.bawei.base.userrole.service.ReUserRoleService;

@Service
public class ReUserRoleServiceImpl implements ReUserRoleService {

	@Resource
	private ReUserRoleMapper reUserRoleMapper;

	public void addReUserRole(ReUserRole reUserRole) {
		reUserRoleMapper.insert(reUserRole);
	}

	public void updateReUserRole(ReUserRole reUserRole) {
		reUserRoleMapper.updateByPrimaryKey(reUserRole);
	}

	public void deleteReUserRole(Long id) {
		reUserRoleMapper.deleteByPrimaryKey(id);
	}

	public List<ReUserRole> getReUserRole() {
		return reUserRoleMapper.selectByExample(new ReUserRoleExample());
	}

	public ReUserRole getReUserRoleById(Long id) {
		return reUserRoleMapper.selectByPrimaryKey(id);
	}
}
